package com.p2p.quartz;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.p2p.account.po.Agent;
import com.p2p.account.service.AgentService;
import com.p2p.common.cache.CacheManager;
import com.p2p.common.redis.RedisService;
import com.p2p.common.redis.vo.RedisVo;
import com.p2p.common.utils.StringUtils;
import com.p2p.terminal.po.AreaInfo;
import com.p2p.terminal.service.AreaInfoService;
import com.p2p.wallet.service.CoinStartService;

import net.sf.json.JSONObject;

public class CoinJob {
	
	@Resource
	protected RedisTemplate redisTemplate;
	@Autowired
	private CoinStartService coinService;

	// 启动任务
	public void start() {

		try {
			coinService.getHTMLUrls();

			coinService.PutCoin("t1SkbdKzxR3TaX5wxAU4xj1v8D9RD5GYf1Y", "utf-8", "ZEC");
			Date date = new Date();
			Date date1 = new Date(date.getTime() - 60 * 60 * 1000);
			SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:00:00");
			String str = format.format(date1);
			String nstr = format.format(date);
			System.out.println(redisTemplate.opsForHash().entries("ZEC" + ":" + str));

			// System.out.println("启动成啦"+redisService.get("ZEC").getValue());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	

}
